using System;
using System.Collections.Generic;
using System.Text;
using System.Reflection;

namespace MyDBUtilit
{
    public class DALFactory
    {
        private static readonly string path = "MyDBUtilit";

        public static IBaseDAL<BaseModel> GetBaseInterface()
        {
            string strClassName = path +  ".Model1";
            return (IBaseDAL<BaseModel>)Assembly.Load(path).CreateInstance(strClassName);
        }

    }

    public class Factory<K> where K : IBaseDAL<K>
    {
        private static readonly string path = "MyDBUtilit";
        public static K GetBaseInterface()
        {
            string strClassName = path + ".Model1";
            return (K)Assembly.Load(path).CreateInstance(strClassName);
        }
    }
}
